nbd: reclassify socket lock in nbd_reconnect_socket#1038
Open
blktests-ci[bot] wants to merge 1 commit into
Open
nbd: reclassify socket lock in nbd_reconnect_socket#1038blktests-ci[bot] wants to merge 1 commit into
blktests-ci[bot] wants to merge 1 commit into
Conversation
Author
|
Upstream branch: 8cdeaa5 |
a644c13 to
a2204c3
Compare
nbd_reconnect_socket() obtains a new socket via nbd_get_socket() but does not call nbd_reclassify_socket(), leaving the socket's sk_lock in the default AF_INET6 lockdep class. This causes false circular lock dependency warnings because lockdep merges the NBD socket's sk_lock with unrelated sockets (e.g., rawv6_sendmsg) that establish a sk_lock -> fs_reclaim dependency in normal operation. nbd_add_socket() already reclassifies correctly on the initial connect path, but the reconnect path was missed. Add the missing nbd_reclassify_socket() call after nbd_get_socket() in nbd_reconnect_socket(). Reported-by: syzbot+576095eed5658cbd9b63@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=576095eed5658cbd9b63 Fixes: d532cdd ("nbd: Reclassify sockets to avoid lockdep circular dependency") Signed-off-by: Yun Zhou <yun.zhou@windriver.com>
Author
|
Upstream branch: 0e35b9b |
77139d8 to
c360fb5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request for series with
subject: nbd: reclassify socket lock in nbd_reconnect_socket
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1122538